package actions 
{
	import com.greensock.TweenLite;
	import core.App;
	import view.scene.Scene;
	/**
	 * ...
	 * @author Johnny Cheng
	 */
	public class MoveRightAction 
	{
		
		public function MoveRightAction(oldScene:Scene, newScene:Scene) 
		{
			if (oldScene == null) return;
			oldScene.mouseChildren = newScene.mouseChildren = false;
			
			TweenLite.to(oldScene, 0.5, { x:App.stage.stageWidth, onComplete:function():void { oldScene.x = 0; oldScene.removeSelf(); }} );
			TweenLite.from(newScene, 0.5, { x: -App.stage.stageWidth, onComplete:function():void { newScene.mouseChildren = true; } } );
		}
		
	}

}